dbg = {
  data = {}
}

function dbg.add(text, ...)
  text = tostring(text)
  for _,x in ipairs({...}) do
    text = text .. " " .. tostring(x) .. ";"
  end
  dbg.data[#dbg.data+1] = text
  dbg.data[#dbg.data+1] = nil
end

function dbg.flush()
  for i,v in ipairs(dbg.data) do
    love.graphics.print(v,5, i*15)
  end
  dbg.data = {}
end
